﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<nelech.Models.DBModel.Advert>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	רשימת פרסומות
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>רשימת פירסומות</h2>

    <table>
        <tr>
            <th></th>
            <th>
                מס
            </th>
            <th>
                כןתרת     </th>
                <th>
                תאריך
            </th>
           
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("עריכה", "EditAdvert", new { id=item.id }) %> |
                <%= Html.ActionLink("לסל מיחזור", "RecycleAdvert", new { id = item.id })%>
            </td>
            <td>
                <%= Html.Encode(item.id) %>
            </td>
            <td>
                <%= Html.Encode(item.name) %>
            </td>
            
          
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("צור חדש", "CreateAdvert") %>
          <%= Html.ActionLink("לסל מיחזור", "RecycleBinAdvert" , "Advert")%>
    </p>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

